does perl execute in a subshell??

does perl execute in a subshell??

am 27.02.2007 08:01:49 von ukhas jean

--===============1193185255==
Content-Type: multipart/alternative; boundary="0-1818271704-1172559709=:86467"
Content-Transfer-Encoding: 7bit

--0-1818271704-1172559709=:86467
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

This is a curious question coming to my mind. I am making perl programs o=
n Unix (korn shell) . Just wanted to know when these perl programs are ru=
n, do they execute on the same shell?? or do they execute in a subshell??
=20
This is a curious thing tht came to my mind.
=20
Regards,
Ukh

=20
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
--0-1818271704-1172559709=:86467
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

This is a curious question coming to my mind. I am making perl =
programs on Unix (korn shell) . Just wanted to know when these perl progr=
ams are run, do they execute on the same shell?? or do they execute in a =
subshell??
 
This is a curious thing tht cam=
e to my mind.
 
Regards,
Ukh v>




It's here! Your new message!
Get
com/toolbar/features/mail/"> new email alerts with the free "
http://us.rd.yahoo.com/evt=3D49938/*http://tools.search.yaho o.com/toolbar=
/features/mail/">Yahoo! Toolbar.

--0-1818271704-1172559709=:86467--

--===============1193185255==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1193185255==--

RE: does perl execute in a subshell??

am 27.02.2007 10:49:54 von Brian Raven

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of ukhas
jean
Sent: 27 February 2007 07:02
To: Active Perl
Subject: does perl execute in a subshell??

> This is a curious question coming to my mind. I am making perl
programs on Unix (korn shell) . Just wanted to
> know when these perl programs are run, do they execute on the same
shell?? or do they execute in a subshell??

Neither, perl executes in a separate process from any shell that invokes
it.

HTH

-- =

Brian Raven =


==================== =====3D=
================
Atos Euronext Market Solutions Disclaimer
==================== =====3D=
================

The information contained in this e-mail is confidential and solely for the=
intended addressee(s). Unauthorised reproduction, disclosure, modification=
, and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediat=
ely and delete it from your system. The views expressed in this message do =
not necessarily reflect those of Atos Euronext Market Solutions.

Atos Euronext Market Solutions Limited - Registered in England & Wales with=
registration no. 3962327. Registered office address at 25 Bank Street Lon=
don E14 5NQ United Kingdom. =

Atos Euronext Market Solutions SAS - Registered in France with registration=
no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann 750=
09 Paris France.

L'information contenue dans cet e-mail est confidentielle et uniquement des=
tinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Tou=
te copie, publication ou diffusion de cet email est interdite. Si cet e-mai=
l vous parvient par erreur, nous vous prions de bien vouloir prevenir l'exp=
editeur immediatement et d'effacer le e-mail et annexes jointes de votre sy=
steme. Le contenu de ce message electronique ne represente pas necessaireme=
nt la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Soci=E9t=E9 de droit anglais, enregi=
str=E9e au Royaume Uni sous le num=E9ro 3962327, dont le si=E8ge social se =
situe 25 Bank Street E14 5NQ Londres Royaume Uni.

Atos Euronext Market Solutions SAS, soci=E9t=E9 par actions simplifi=E9e, e=
nregistr=E9 au registre dui commerce et des soci=E9t=E9s sous le num=E9ro 4=
25 100 294 RCS Paris et dont le si=E8ge social se situe 6/8 Boulevard Hauss=
mann 75009 Paris France.
==================== =====3D=
================

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: does perl execute in a subshell??

am 27.02.2007 11:17:15 von Bill Luebkert

ukhas jean wrote:
> This is a curious question coming to my mind. I am making perl programs
> on Unix (korn shell) . Just wanted to know when these perl programs are
> run, do they execute on the same shell?? or do they execute in a subshell??
>
> This is a curious thing tht came to my mind.

If you run a Perl script from the command line, I would assume it would
be run as a separate child process under the korn shell (I believe part
of the process group for that shell, but I've never used korn shell, so
I'm guessing it's pretty much the same as other shells).

If in the Perl script you were to run a 'system' call, backticks or similar
type calls, they would be run as child processes of the Perl script process.
You can obviously background the processes you start and disassociate them
from the creating process if that's expedient to your needs.

You can assign the processes to a process group (setpgid) if you need to
control them en masse.

You could read fork() and exec() man pages for the normal process creating
scenario on UNIX systems.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs